package de.wesemann.jdedun.entities.calendar.hosts;

import de.wesemann.jdedun.entities.AbstractEntity;

public class CalendarHost extends AbstractEntity {

    private String first_name;
    private String last_name;
    private String company;
    private String street;
    private int housenumber;
    private String housenumber_additional;
    private String postcode;
    private String city;
    private String phone;
    private String fax;
    private String mobile;
    private String email;
    private String url;
    private String comment;

    /**
     * Vorname des Veranstalters
     * 
     * @return the first_name
     */
    public String getFirst_name() {
	return first_name;
    }

    /**
     * Vorname des Veranstalters
     * 
     * @param first_name
     *            the first_name to set
     */
    public void setFirst_name(String first_name) {
	this.first_name = first_name;
    }

    /**
     * Nachname des Veranstalters
     * 
     * @return the last_name
     */
    public String getLast_name() {
	return last_name;
    }

    /**
     * Nachname des Veranstalters
     * 
     * @param last_name
     *            the last_name to set
     */
    public void setLast_name(String last_name) {
	this.last_name = last_name;
    }

    /**
     * Veranstaltende Firma
     * 
     * @return the company
     */
    public String getCompany() {
	return company;
    }

    /**
     * Veranstaltende Firma
     * 
     * @param company
     *            the company to set
     */
    public void setCompany(String company) {
	this.company = company;
    }

    /**
     * offizieller Straßenname, “-Straße” ausschreiben!
     * 
     * @return the street
     */
    public String getStreet() {
	return street;
    }

    /**
     * offizieller Straßenname, “-Straße” ausschreiben!
     * 
     * @param street
     *            the street to set
     */
    public void setStreet(String street) {
	this.street = street;
    }

    /**
     * nur EINE Zahl, für alles weitere das Feld housnumber_additional verwenden
     * 
     * @return the housenumber
     */
    public int getHousenumber() {
	return housenumber;
    }

    /**
     * nur EINE Zahl, für alles weitere das Feld housnumber_additional verwenden
     * 
     * @param housenumber
     *            the housenumber to set
     */
    public void setHousenumber(int housenumber) {
	this.housenumber = housenumber;
    }

    /**
     * Zusatz zur Hausnummer: z.B. -45, a, Tor B, Gebäude 5, Aufgang G
     * 
     * @return the housenumber_additional
     */
    public String getHousenumber_additional() {
	return housenumber_additional;
    }

    /**
     * Zusatz zur Hausnummer: z.B. -45, a, Tor B, Gebäude 5, Aufgang G
     * 
     * @param housenumber_additional
     *            the housenumber_additional to set
     */
    public void setHousenumber_additional(String housenumber_additional) {
	this.housenumber_additional = housenumber_additional;
    }

    /**
     * fünfstellige Postleitzahl (String, keine Zahl siehe Postleitzahlen auf
     * Wikipedia)
     * 
     * @return the postcode
     */
    public String getPostcode() {
	return postcode;
    }

    /**
     * fünfstellige Postleitzahl (String, keine Zahl siehe Postleitzahlen auf
     * Wikipedia)
     * 
     * @param postcode
     *            the postcode to set
     */
    public void setPostcode(String postcode) {
	this.postcode = postcode;
    }

    /**
     * offizieller Name des Ortes, Halle (Saale) → korrekt, Halle an der Saale →
     * falsch
     * 
     * @return the city
     */
    public String getCity() {
	return city;
    }

    /**
     * offizieller Name des Ortes, Halle (Saale) → korrekt, Halle an der Saale →
     * falsch
     * 
     * @param city
     *            the city to set
     */
    public void setCity(String city) {
	this.city = city;
    }

    /**
     * Festnetzummer des Veranstalters nach DIN 5008 (Schreibweisen auf
     * Wikipedia)
     * 
     * @return the phone
     */
    public String getPhone() {
	return phone;
    }

    /**
     * Festnetzummer des Veranstalters nach DIN 5008 (Schreibweisen auf
     * Wikipedia)
     * 
     * @param phone
     *            the phone to set
     */
    public void setPhone(String phone) {
	this.phone = phone;
    }

    /**
     * Faxnummer des Veranstalters nach DIN 5008 (Schreibweisen auf Wikipedia)
     * 
     * @return the fax
     */
    public String getFax() {
	return fax;
    }

    /**
     * Faxnummer des Veranstalters nach DIN 5008 (Schreibweisen auf Wikipedia)
     * 
     * @param fax
     *            the fax to set
     */
    public void setFax(String fax) {
	this.fax = fax;
    }

    /**
     * mobile Rufnummer des Veranstalters nach DIN 5008 (Schreibweisen auf
     * Wikipedia)
     * 
     * @return the mobile
     */
    public String getMobile() {
	return mobile;
    }

    /**
     * mobile Rufnummer des Veranstalters nach DIN 5008 (Schreibweisen auf
     * Wikipedia)
     * 
     * @param mobile
     *            the mobile to set
     */
    public void setMobile(String mobile) {
	this.mobile = mobile;
    }

    /**
     * eine Emailadresse
     * 
     * @return the email
     */
    public String getEmail() {
	return email;
    }

    /**
     * eine Emailadresse
     * 
     * @param email
     *            the email to set
     */
    public void setEmail(String email) {
	this.email = email;
    }

    /**
     * Link zur Website des Veranstalters (Internetadresse beginnend mit
     * http://)
     * 
     * @return the url
     */
    public String getUrl() {
	return url;
    }

    /**
     * Link zur Website des Veranstalters (Internetadresse beginnend mit
     * http://)
     * 
     * @param url
     *            the url to set
     */
    public void setUrl(String url) {
	this.url = url;
    }

    /**
     * Freitext für zusätzliche Angaben
     * 
     * @return the comment
     */
    public String getComment() {
	return comment;
    }

    /**
     * Freitext für zusätzliche Angaben
     * 
     * @param comment
     *            the comment to set
     */
    public void setComment(String comment) {
	this.comment = comment;
    }

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
	final int prime = 31;
	int result = super.hashCode();
	result = prime * result + ((city == null) ? 0 : city.hashCode());
	result = prime * result + ((comment == null) ? 0 : comment.hashCode());
	result = prime * result + ((company == null) ? 0 : company.hashCode());
	result = prime * result + ((email == null) ? 0 : email.hashCode());
	result = prime * result + ((fax == null) ? 0 : fax.hashCode());
	result = prime * result
		+ ((first_name == null) ? 0 : first_name.hashCode());
	result = prime * result + housenumber;
	result = prime
		* result
		+ ((housenumber_additional == null) ? 0
			: housenumber_additional.hashCode());
	result = prime * result
		+ ((last_name == null) ? 0 : last_name.hashCode());
	result = prime * result + ((mobile == null) ? 0 : mobile.hashCode());
	result = prime * result + ((phone == null) ? 0 : phone.hashCode());
	result = prime * result
		+ ((postcode == null) ? 0 : postcode.hashCode());
	result = prime * result + ((street == null) ? 0 : street.hashCode());
	result = prime * result + ((url == null) ? 0 : url.hashCode());
	return result;
    }

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(Object obj) {
	if (this == obj) {
	    return true;
	}
	if (!super.equals(obj)) {
	    return false;
	}
	if (getClass() != obj.getClass()) {
	    return false;
	}
	CalendarHost other = (CalendarHost) obj;
	if (city == null) {
	    if (other.city != null) {
		return false;
	    }
	} else if (!city.equals(other.city)) {
	    return false;
	}
	if (comment == null) {
	    if (other.comment != null) {
		return false;
	    }
	} else if (!comment.equals(other.comment)) {
	    return false;
	}
	if (company == null) {
	    if (other.company != null) {
		return false;
	    }
	} else if (!company.equals(other.company)) {
	    return false;
	}
	if (email == null) {
	    if (other.email != null) {
		return false;
	    }
	} else if (!email.equals(other.email)) {
	    return false;
	}
	if (fax == null) {
	    if (other.fax != null) {
		return false;
	    }
	} else if (!fax.equals(other.fax)) {
	    return false;
	}
	if (first_name == null) {
	    if (other.first_name != null) {
		return false;
	    }
	} else if (!first_name.equals(other.first_name)) {
	    return false;
	}
	if (housenumber != other.housenumber) {
	    return false;
	}
	if (housenumber_additional == null) {
	    if (other.housenumber_additional != null) {
		return false;
	    }
	} else if (!housenumber_additional.equals(other.housenumber_additional)) {
	    return false;
	}
	if (last_name == null) {
	    if (other.last_name != null) {
		return false;
	    }
	} else if (!last_name.equals(other.last_name)) {
	    return false;
	}
	if (mobile == null) {
	    if (other.mobile != null) {
		return false;
	    }
	} else if (!mobile.equals(other.mobile)) {
	    return false;
	}
	if (phone == null) {
	    if (other.phone != null) {
		return false;
	    }
	} else if (!phone.equals(other.phone)) {
	    return false;
	}
	if (postcode == null) {
	    if (other.postcode != null) {
		return false;
	    }
	} else if (!postcode.equals(other.postcode)) {
	    return false;
	}
	if (street == null) {
	    if (other.street != null) {
		return false;
	    }
	} else if (!street.equals(other.street)) {
	    return false;
	}
	if (url == null) {
	    if (other.url != null) {
		return false;
	    }
	} else if (!url.equals(other.url)) {
	    return false;
	}
	return true;
    }

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
	StringBuilder builder = new StringBuilder();
	builder.append("CalendarHost [first_name=").append(first_name)
		.append(", last_name=").append(last_name).append(", company=")
		.append(company).append(", street=").append(street)
		.append(", housenumber=").append(housenumber)
		.append(", housenumber_additional=")
		.append(housenumber_additional).append(", postcode=")
		.append(postcode).append(", city=").append(city)
		.append(", phone=").append(phone).append(", fax=").append(fax)
		.append(", mobile=").append(mobile).append(", email=")
		.append(email).append(", url=").append(url)
		.append(", comment=").append(comment).append("]");
	return builder.toString();
    }

}
